package Boundry;

import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;

import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTextField;


import Boundry.GenericTools.IPanelOperation;
import Boundry.GenericTools.InputPanel;
import net.sourceforge.jdatepicker.impl.JDatePanelImpl;
import net.sourceforge.jdatepicker.DateModel;
import net.sourceforge.jdatepicker.impl.JDatePickerImpl;

public class NominateExaminerGUI extends InputPanel implements IPanelOperation,ActionListener{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JComboBox comboBoxWorker;
	private JLabel lblWorker;
	private JLabel lblNominateExaminer;
	//private DateChooserPanel datechooser = new DateChooserPanel();
	/**
	 * Create the panel.
	 */
	public void addElementToComboBox(String elem)
	{
		comboBoxWorker.addItem(elem);
	}
	
	public static void main(String[] args)
	{
		JFrame frame = new JFrame();
		frame.getContentPane().add(new NominateExaminerGUI());
		frame.setVisible(true);
	}
	
	public NominateExaminerGUI() {
		super();
		setLayout(null);
		
		lblNominateExaminer = new JLabel("Nominate examiner");
		lblNominateExaminer.setFont(new Font("Tahoma", Font.PLAIN, 22));
		lblNominateExaminer.setBounds(269, 25, 260, 37);
		mainPanel.add(lblNominateExaminer);
		
		comboBoxWorker = new JComboBox();
		comboBoxWorker.setBounds(313, 73, 184, 20);
		mainPanel.add(comboBoxWorker);
		
		lblWorker = new JLabel("Worker:");
		lblWorker.setFont(new Font("Tahoma", Font.PLAIN, 14));
		lblWorker.setBounds(231, 73, 61, 20);
		mainPanel.add(lblWorker);
		this.revalidate();
		this.repaint();
	}

	@Override
	public String apHelpButton() {
		return "Choose a worker for examining the request (Testing)";
	}

	public void setdata(String string) {
		
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		//  DateModel<Date> date = (DateModel<Date>) datepanelPicker.getModel();
		//  System.out.println(date.getDay() + " "+date.getMonth() +" "+date.getYear());
		
	}
	public JComboBox getcomboBoxWorker(){
		return this.comboBoxWorker;
	}

	@Override
	public String setTitle() {
 		return "Assign Exminer to a Request";
	}

}